|
|
@@ -1153,16 +1153,28 @@ def member_activity_contribute_welfare_unlock(request, administrator):
|
1153
|
1153
|
except MemberActivityContributionWelfareInfo.DoesNotExist:
|
1154
|
1154
|
return response(MemberActivityContributionWelfareStatusCode.ACTIVITY_CONTRIBUTION_WELFARE_NOT_FOUND)
|
1155
|
1155
|
|
1156
|
|
- unlocking_info, _ = MemberActivityContributionWelfareUnlockingInfo.objects.create(
|
1157
|
|
- brand_id=administrator.brand_id,
|
1158
|
|
- admin_id=admin_id,
|
1159
|
|
- user_id=contribution.user_id,
|
1160
|
|
- activity_id=contribution.activity_id,
|
1161
|
|
- contribution_id=contribution_id,
|
1162
|
|
- welfare_id=welfare_id,
|
1163
|
|
- welfare_type=welfare.welfare_type,
|
1164
|
|
- welfare_value=welfare.welfare_value,
|
1165
|
|
- )
|
|
1156
|
+ try:
|
|
1157
|
+ unlocking_info, _ = MemberActivityContributionWelfareUnlockingInfo.objects.create(
|
|
1158
|
+ brand_id=administrator.brand_id,
|
|
1159
|
+ admin_id=admin_id,
|
|
1160
|
+ user_id=contribution.user_id,
|
|
1161
|
+ activity_id=contribution.activity_id,
|
|
1162
|
+ contribution_id=contribution_id,
|
|
1163
|
+ welfare_id=welfare_id,
|
|
1164
|
+ welfare_type=welfare.welfare_type,
|
|
1165
|
+ welfare_value=welfare.welfare_value,
|
|
1166
|
+ )
|
|
1167
|
+ except:
|
|
1168
|
+ unlocking_info = MemberActivityContributionWelfareUnlockingInfo.objects.get(
|
|
1169
|
+ brand_id=administrator.brand_id,
|
|
1170
|
+ admin_id=admin_id,
|
|
1171
|
+ user_id=contribution.user_id,
|
|
1172
|
+ activity_id=contribution.activity_id,
|
|
1173
|
+ contribution_id=contribution_id,
|
|
1174
|
+ welfare_id=welfare_id,
|
|
1175
|
+ welfare_type=welfare.welfare_type,
|
|
1176
|
+ welfare_value=welfare.welfare_value,
|
|
1177
|
+ )
|
1166
|
1178
|
|
1167
|
1179
|
# Send template_message
|
1168
|
1180
|
try:
|